package com.hlkj.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;

public class SqlserverTest {

	public static void main(String[] args) {

		String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";

		String dbURL = "jdbc:sqlserver://121.199.0.211:1433;DatabaseName=JJS_WMS";

		String userName = "sa";

		String userPwd = "waterloo11";

		try {

			Class.forName(driverName);

			Connection conn = DriverManager.getConnection(dbURL, userName,
					userPwd);

			PreparedStatement ps = conn.prepareStatement("select 1");

			ps.executeQuery();

		} catch (Exception e) {

			e.printStackTrace();

		}

	}

}
